import React from 'react';
import { useLocation } from 'react-router-dom';
import './BusinessMonitor.css';

const BusinessMonitor: React.FC = () => {
  const location = useLocation();
  
  // 根据路径显示不同的内容
  const renderContent = () => {
    if (location.pathname === '/business-monitor/statistics') {
      return (
        <div className="monitor-content">
          <h2>信息统计</h2>
          <p>这里显示业务相关的统计信息。</p>
        </div>
      );
    } else if (location.pathname === '/info') {
      return (
        <div className="monitor-content">
          <h2>信息统计</h2>
          <p>这里是信息统计模块，您可以查看系统各项数据的统计信息。</p>
        </div>
      );
    } else {
      return (
        <div className="monitor-content">
          <h2>信息统计</h2>
          <p>请从上方菜单选择您想要查看的信息统计信息。</p>
          <p>您可以点击"信息统计"查看下拉菜单中的选项。</p>
        </div>
      );
    }
  };

  return (
    <div className="business-monitor-container">
      {renderContent()}
    </div>
  );
};

export default BusinessMonitor; 